#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
#include <climits>

using namespace std;


struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
public:
	int height;
	void levelOrder(TreeNode* root, vector<vector<int> >& answer, int level){
		if (root == NULL){
			return;
		}
		if (answer.size() < level + 1){
			vector<int> layer;
			answer.push_back(layer);
		}
		levelOrder(root->left, answer, level + 1);
		levelOrder(root->right, answer, level + 1);
		answer[level].push_back(root->val);
	}
	vector<vector<int> > levelOrder(TreeNode *root) {
		vector<vector<int> > answer;
		levelOrder(root, answer, 0);
		return answer;
	}
};


int main(int argc, char argv){
	
	return 0;
}